package cn.edu.xust.Ro;

import lombok.Data;

import java.io.Serializable;


@Data
public class HotelDistanceRO implements Serializable,Comparable {
    private static final long serialVersionUID = 1L;

    private int hotelId;
    private String hotelCname;
    private String hotelName;
    private String hotelAddress;
    private String relativeDistance;
    private String hotelStar;
    private String hotelGroup;
    private String rcuId;
    private String floor;
    private String floorList;
    private double longitude;
    private double latitude;
    private String pmshotelId;

    @Override
    public int compareTo(Object o) {
        HotelDistanceRO hotelDistanceRO = (HotelDistanceRO) o;
        String relativeDistance = this.getRelativeDistance();
        String relativeDistance1 = hotelDistanceRO.getRelativeDistance();
        Double num=Double.parseDouble(relativeDistance)-Double.parseDouble(relativeDistance1);
        int i = num.intValue();
        int num1=i==0? relativeDistance.compareTo(relativeDistance1):i;
        return num1;
    }
}
